package Test.ThirdFour;


/**
 * 柱体测试类
 */
public class PillarTest {
    public static void main(String[] args) {
        /**
         * 声明pillar1 为默认柱体
         * 声明pillar2 带参数构造柱体底面和侧面
         */
        Pillar pillar1=new Pillar();
        Pillar pillar2=new Pillar(6,7,5,8);

        /**
         * 计算pillar1和pillar2的体积
         */
        int pillarOneVolume=pillar1.volume();
        int pillarTwoVolume=pillar2.volume();

        /**
         * 输出pillar1和pillar2的体积
         */
        System.out.println("柱体1体积："+pillarOneVolume);
        System.out.println("柱体2体积："+pillarTwoVolume);

    }
}
